fix: resolve 3 medium-severity review issues#11
Merged
Conversation
1. Live-updatable gate threshold, suppression & dynamic threshold: Added Arc<Atomic*> fields to VoidProcessor for gate_threshold, suppression_strength, and dynamic_threshold_enabled. The audio thread now reads these atomics each frame instead of using values captured at engine start. GUI slider/preset/calibration changes take effect immediately without restarting the engine. 2. Cache pactl virtual sink check: virtual_sink_exists() was spawning pactl on every GUI frame (~30fps). Now cached with a 2-second refresh timer, matching the connected apps refresh pattern. 3. Pre-allocate spectrum Hann window buffers: Pre-compute Hann window coefficients once at processor creation and reuse fixed-size buffers for windowed samples, eliminating two Vec allocations per spectrum analysis call on the audio thread. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Arc<Atomic*>fields so the audio thread reads these values each frame instead of using values captured at engine start. GUI slider, preset, and calibration changes now take effect immediately without restarting the engine.virtual_sink_exists()was spawningpactlon every GUI frame (~30fps). Now cached with a 2-second refresh timer.Vecallocations per spectrum analysis call on the audio thread.Test plan
cargo checkpassescargo clippy— no new warningscargo test— all 16 tests passpactlcalls🤖 Generated with Claude Code